package Controller;
import Entity.Complaint;
import GUI.CustomerServiceWorkerGUI;;

/**
 * this is a controller for handling complaints by the service class worker. it will just run his GUI.
 * @author mabos555
 *
 */
public class ComplaintHandelingController {

	/**
	 * is the function for getting complaints to handle from the DB.
	 * @param cid= the customer id that we want to get his complains.
	 * @return the complaints of the customer.
	 */
	//this function will work after we will have the SQL. it will return us the customer's complaint array
	public static Complaint[] getCustomerComplaintsForHandeling(String cid)
	{
		Complaint[] myc=new Complaint[1];
		String s="hello \n my name is moran \n this is a check!";
		myc[0]=new Complaint(cid,s);
		DBcontroller.viewCustomerComplaintSQL(cid); // we will call the SQL function.
		// in this part of the code we will need to trim the relation to the array.
		return myc;
	} 
	
	/**
	 * is the function for getting the customer complaints which were handled.
	 * @param cid= the customer id.
	 * @return the complaints of the customer id.
	 */
	//this function will work after we will have the SQL. it will return us the customer's complaint array
	public static Complaint[] getCustomerComplaintsHandeled(String cid)
	{
		Complaint[] myc=new Complaint[1]; 
		myc[0]=new Complaint(cid,"hello");
		DBcontroller.viewCustomerComplaintSQL(cid); // we will call the SQL function.
		// in this part of the code we will need to trim the relation to the array.
		myc[0].setHandled(true);
		myc[0].setResult("hi");
		myc[0].setCompensation(100.0);
		return myc;
	} 
	

}
